package com.dongao.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import com.dongao.activity.R;

public class Welcome extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        
//        Thread timer = new Thread(){
//        	 public void run(){
//        		 try {
//					Thread.sleep(2000);
//				} catch (InterruptedException e) {
//					// TODO Auto-generated catch block
//					e.printStackTrace();
//				}
//        		Intent intent=getIntent();
//        		intent.setClass(Welcome.this, LoginActivity.class);
//        		Welcome.this.startActivity(intent);
//        	 }
//        };
        
        new Handler().postDelayed(new Runnable(){
        	@Override
	        public void run() {
	        	Intent intent = new Intent();
	        	intent.setClass(Welcome.this, LoginActivity.class);
	        	Welcome.this.startActivity(intent);
	        	finish();
	        }
        	}, 2000);
    }


//    @Override
//    public boolean onCreateOptionsMenu(Menu menu) {
//        // Inflate the menu; this adds items to the action bar if it is present.
//        getMenuInflater().inflate(R.menu.welcome, menu);
//        return true;
//    }
    
}
